<template>
  <div class="contract-payment">
    <s-table
      bordered
      size="middle"
      ref="table"
      :row-key="(record) => record.id"
      :columns="addressColumns"
      :data="addressData"
    >
    </s-table>
  </div>
</template>

<script>
import { STable } from '@/components'
import financeColumns from '@/columns/finance'
import { getAddressList } from '@/api/contract'

export default {
  components: {
    STable
  },
  name: 'Address',
  data () {
    return {
      addressColumns: financeColumns.address,
      addressData: parameters => {
        return getAddressList(Object.assign(parameters, this.queryParam)).then(res => {
          return res.result
        })
      },
      queryParam: {}
    }
  },
  created () {
    this.queryParam['filter[contract_id]'] = this.$route.params.id
  }
}
</script>

<style scoped>

</style>
